package com.lx.controller;

import cn.hutool.json.JSON;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import com.github.pagehelper.PageInfo;
import com.lx.bean.Authority;
import com.lx.service.AuthorityService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/Authority")
public class AuthorityController {
    @Resource
    AuthorityService authorityService;
    @RequestMapping("/getHome")
    @ResponseBody
    public String getHome(){
        Integer id=1;
        System.out.println("qqq");
        List list= authorityService.getHome(id);
        String s = JSONUtil.toJsonStr(list);
        System.out.println(s);
        return s;
    }

}
